import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'app_document_platform_interface.dart';

/// An implementation of [AppDocumentPlatform] that uses method channels.
class MethodChannelAppDocument extends AppDocumentPlatform {
  /// The method channel used to interact with the native platform.
  @visibleForTesting
  final methodChannel = const MethodChannel('app_document');

  @override
  Future<String?> getPlatformVersion() async {
    final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  }

  @override
  Future<String?> getDocumentPath() async {
    final path = await methodChannel.invokeMethod<String>('getDocumentPath');
    print('调用原生的getDocumentPath');
    return path;
  }
}
